<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>7 ploygon</title>

  <style>
    .box {
      display: flex;
    }

    .triangle {
      /* 等腰三角形 */
      width: 200px;
      height: 200px;
      background: orange;
      /* 四个角的位置信息，可以任意裁切 */
      /* clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); */
      clip-path: polygon(50% 0, 100% 100%, 0% 100%);
    }

    .triangle2 {
      /* 等边三角形：重点就是设置这个宽高这里 */
      width: 200px;
      height: 100px;
      background: orange;
      clip-path: polygon(50% 0, 100% 100%, 0% 100%);
    }
  </style>
</head>

<body>
  <div class="box">
    <div class="triangle"></div>
    <div class="triangle2"></div>
  </div>
</body>

</html>